/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package thermologic.onewire;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 *
 * @author Mauricio
 */
public class Messages
{
    public static String getMessage(String id)
    {
        String message = "";
        
        if(id == null)
        {
            throw new IllegalArgumentException("Can get no message, id is null");
        }
        
        try
        {       
            message = ResourceBundle.getBundle("thermologic/onewire/messages").getString(id);
        }
        catch(MissingResourceException mse)
        {
            message = id;
        }
        
        return message;
    }
            
}
